<?php 
// ### LATEST POSTS PLUGIN ### //

include('class.latestPosts.php');
$latestPosts = new latestPosts();
$latestPosts->set_page($pageid);
$latestPosts->set_id($article);
$postList = $latestPosts->get_latestPosts();
?>

<h3>Recent posts</h3>
<ul class="sumlist">
    <?php foreach($postList as $post) { ?>
    <li>
        <span class="time"><?php print($post['time']); ?></span>
        <a href="page/2/news/article/<?php print($post['id']); ?>/<?php print(htmlentities(strtolower(str_replace( " ", "-", $post['title']))).URL_EXTENSION); ?>" title="<?php print($post['title']); ?>"><?php print($post['shortTitle']); ?></a>
    </li>
    <?php } ?>
</ul>